##当一个类中有set,get,delete三个方法其中一个的时候，该类就可以当作另一个类的描述符来使用
class MyDecriptor:
    def __init__(self, age=0):
        self.age = age
    
    def __get__(self, instance, owner):
        print("getting...", self, instance, owner)
    def __set__(self, instance, value):
        print("setting...", self, instance, value)
    
    def __delete__(self, instance):
        print("deleting...", self, instance)

class Test:
    x = MyDecriptor()
    age = MyDecriptor()

